package com.zzt.saleDesign;

//满减 100-10
public class FullMinusDecorator extends Decorator{
    public FullMinusDecorator() {}

    public FullMinusDecorator(Sale sale) {
        super(sale);
    }

    @Override
    public double discount(double price) {
        System.out.println("满减前："+price);
        price = price-(int)(price/100)*10;

        System.out.println("满减后："+price);
        return super.discount(price);    //100-10
    }
}
